_init(panel) {
super._init(0.0, null, true);
- this.actor.accessible_role = Atk.Role.MENU;
+ this.accessible_role = Atk.Role.MENU;
this._startingApps = [];
let bin = new St.Bin({ name: 'appMenu' });
bin.connect('style-changed', this._onStyleChanged.bind(this));
- this.actor.add_actor(bin);
+ this.add_actor(bin);
- this.actor.bind_property("reactive", this.actor, "can-focus", 0);
- this.actor.reactive = false;
+ this.bind_property("reactive", this, "can-focus", 0);
+ this.reactive = false;
this._container = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
bin.set_child(this._container);
return;
this._visible = true;
- this.actor.reactive = true;
+ this.reactive = true;
this.show();
- Tweener.removeTweens(this.actor);
- Tweener.addTween(this.actor,
+ Tweener.removeTweens(this);
+ Tweener.addTween(this,
{ opacity: 255,
time: Overview.ANIMATION_TIME,
transition: 'easeOutQuad' });
return;
this._visible = false;
- this.actor.reactive = false;
- Tweener.removeTweens(this.actor);
- Tweener.addTween(this.actor,
+ this.reactive = false;
+ Tweener.removeTweens(this);
+ Tweener.addTween(this,
{ opacity: 0,
time: Overview.ANIMATION_TIME,
transition: 'easeOutQuad',
if (this._targetApp) {
this._busyNotifyId = this._targetApp.connect('notify::busy', this._sync.bind(this));
this._label.set_text(this._targetApp.get_name());
- this.actor.set_accessible_name(this._targetApp.get_name());
+ this.set_accessible_name(this._targetApp.get_name());
}
}
else
this.stopAnimation();
- this.actor.reactive = (visible && !isBusy);
+ this.reactive = (visible && !isBusy);
this._syncIcon();
this.menu.setApp(this._targetApp);
class ActivitiesButton extends PanelMenu.Button {
_init() {
super._init(0.0, null, true);
- this.actor.accessible_role = Atk.Role.TOGGLE_BUTTON;
+ this.accessible_role = Atk.Role.TOGGLE_BUTTON;
- this.actor.name = 'panelActivities';
+ this.name = 'panelActivities';
/* Translators: If there is no suitable word for "Activities"
in your language, you can use the word for "Overview". */
this._label = new St.Label({ text: _("Activities"),
y_align: Clutter.ActorAlign.CENTER });
- this.actor.add_actor(this._label);
+ this.add_actor(this._label);
- this.actor.label_actor = this._label;
+ this.label_actor = this._label;
- this.actor.connect('captured-event', this._onCapturedEvent.bind(this));
- this.actor.connect_after('key-release-event', this._onKeyRelease.bind(this));
+ this.connect('captured-event', this._onCapturedEvent.bind(this));
+ this.connect_after('key-release-event', this._onKeyRelease.bind(this));
Main.overview.connect('showing', () => {
- this.actor.add_style_pseudo_class('overview');
- this.actor.add_accessible_state (Atk.StateType.CHECKED);
+ this.add_style_pseudo_class('overview');
+ this.add_accessible_state (Atk.StateType.CHECKED);
});
Main.overview.connect('hiding', () => {
- this.actor.remove_style_pseudo_class('overview');
- this.actor.remove_accessible_state (Atk.StateType.CHECKED);
+ this.remove_style_pseudo_class('overview');
+ this.remove_accessible_state (Atk.StateType.CHECKED);
});
this._xdndTimeOut = 0;
let [x, y, mask] = global.get_pointer();
let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y);
- if (pickedActor == this.actor && Main.overview.shouldToggleByCornerOrButton())
+ if (pickedActor == this && Main.overview.shouldToggleByCornerOrButton())
Main.overview.toggle();
Mainloop.source_remove(this._xdndTimeOut);
this.menu.box.set_layout_manager(menuLayout);
this._indicators = new St.BoxLayout({ style_class: 'panel-status-indicators-box' });
- this.actor.add_child(this._indicators);
+ this.add_child(this._indicators);
if (Config.HAVE_NETWORKMANAGER) {
this._network = new imports.ui.status.network.NMApplet();
return; // menu not supported by current session mode
let menu = indicator.menu;
- if (!indicator.actor.reactive)
+ if (!indicator.reactive)
return;
menu.toggle();
return;
let menu = indicator.menu;
- if (!indicator.actor.reactive)
+ if (!indicator.reactive)
return;
menu.close();
super._init(params);
- this.actor = this;
this._delegate = this;
this.container = new St.Bin({ y_fill: true,
x_fill: true,
- child: this.actor });
+ child: this });
this.connect('style-changed', this._onStyleChanged.bind(this));
this.connect('destroy', this._onDestroy.bind(this));
this.connect('notify::visible', this._onVisibilityChanged.bind(this));
if (dontCreateMenu)
- this.menu = new PopupMenu.PopupDummyMenu(this.actor);
+ this.menu = new PopupMenu.PopupDummyMenu(this);
else
- this.setMenu(new PopupMenu.PopupMenu(this.actor, menuAlignment, St.Side.TOP, 0));
+ this.setMenu(new PopupMenu.PopupMenu(this, menuAlignment, St.Side.TOP, 0));
}
setSensitive(sensitive) {
if (!this.menu)
return;
- if (!this.actor.visible)
+ if (!this.visible)
this.menu.close();
}
let symbol = event.get_key_symbol();
if (symbol == Clutter.KEY_Left || symbol == Clutter.KEY_Right) {
- let group = global.focus_manager.get_group(this.actor);
+ let group = global.focus_manager.get_group(this);
if (group) {
let direction = (symbol == Clutter.KEY_Left) ? St.DirectionType.LEFT : St.DirectionType.RIGHT;
- group.navigate_focus(this.actor, direction, false);
+ group.navigate_focus(this, direction, false);
return Clutter.EVENT_STOP;
}
}
_onOpenStateChanged(menu, open) {
if (open)
- this.actor.add_style_pseudo_class('active');
+ this.add_style_pseudo_class('active');
else
- this.actor.remove_style_pseudo_class('active');
+ this.remove_style_pseudo_class('active');
// Setting the max-height won't do any good if the minimum height of the
// menu is higher then the screen; it's useful if part of the menu is